import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 周斌
 * Date: 2023-10-31
 * Time: 15:01
 */
public class Test {
  /*  //求最大值方法的重载
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int a = scanner.nextInt();
        int b = scanner.nextInt();
        double c =scanner.nextDouble();
        double d =scanner.nextDouble();
        double e =scanner.nextDouble();
        int max1=max(a,b);
        double max2=max(c,d,e);
        System.out.println(max1);
        System.out.println(max2);
    }
    public static int max(int x,int y) {
        return x>y?x:y;
    }
    public static double max(double x,double y,double z) {
        double secondaryMax = x > y ? x : y;
        return secondaryMax > z ? secondaryMax : z;
    }*/
   /* //求和的重载
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int a = scanner.nextInt();
        int b = scanner.nextInt();
        double c =scanner.nextDouble();
        double d =scanner.nextDouble();
        double e =scanner.nextDouble();
        int sum1=add(a,b);
        double sum2=add(c,d,e);
        System.out.println(sum1);
        System.out.println(sum2);
    }
    public static int add(int x,int y) {
        return x+y;
    }
    public static double add(double x,double y,double z) {
        return x+y+z;
    }*/


   /* //使用函数求最大值
    public static void main(String[] args) {
       Scanner scanner = new Scanner(System.in);
       int a =scanner.nextInt();
       int b =scanner.nextInt();
       int c =scanner.nextInt();
       int max=max2(a,b);
       int max1=max3(max,c);
        System.out.println("最大值为:"+max1);
        }

    public static int max2(int x,int y) {
        return x>y?x:y;
    }
    public static int max3(int max2,int z) {
        return max2>z?max2:z;
    }*/


    /* public static void main(String[] args) {
         //模拟登录
         Scanner scanner = new Scanner(System.in);
         String userInPut = "0";
         int count = 0;//记录比较次数
         //1.自己设定一个密码
         String password = "123456";
         //将设置的密码来与我们输入的比较
         while(count <= 2) {
             System.out.println("请输入密码:>");
             userInPut = scanner.nextLine();
             count++;
             if (password.equals(userInPut)) {
                 System.out.println("登陆成功");
                 break;
             }
         }
         if(count == 3 ) {
             System.out.println("退出程序");
         }
     }*/
    /*public static void main(String[] args) {
        //输出一个整数的每一位
        Scanner scanner = new Scanner(System.in);
        int num = scanner.nextInt();
        while(num != 0) {
            System.out.print(num % 10+" ");//当num不为0，就输出个位。
            num /= 10;//输出完之后，就除去个位数。
        }
    }*/
    //计算分数的值
    //分成两部分来相加，一部分奇数位，另一部分偶数位。
    public static void main(String[] args) {
        float sum1 = 0;
        float sum2 = 0;
        float sum = 0;
        for (int i = 1; i <= 100; i++) {
            if (i % 2 != 0) {
                //奇数位
                sum1 += 1.0 / i;
            } else {
                //偶数位
                sum2 -= 1.0 / i;
            }
        }
        sum = sum1 + sum2;
        System.out.println(sum);
    }
    //打印x图形
    /*public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        while(scanner.hasNextInt()){
            int n = scanner.nextInt();
            //行
            for (int i = 1; i <=n; i++) {
                //列
                for (int j = 1; j <=n ; j++) {
                    //当i==j或者n+1-i==j的时候打印*，其余打印空格
                    if(i == j || n+1-i == j){
                        System.out.print("*");
                    }
                    else {
                        System.out.print(" ");
                    }
                }
                System.out.println();
            }
        }
    }*/
}